﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Peak.Core;
using Peak.Core.DataInterfaces;
using Peak.Resources;

namespace Peak.Web.Controllers.Models
{
  public class SprintsModel 
  {
    public double AvgRealVelocity { get; private set; }
    public IList<SprintModel> Sprints { get; set; }

    public SprintsModel(IList<SprintModel> sprints)
    {
      Sprints = sprints;
      if(sprints.Count > 0)
        AvgRealVelocity = sprints.Sum(f => f.RealVelocity)/sprints.Count;
    }
  }
}
